class Employee:
    number = 0
    def __init__(self):
        Employee.number += 1
    def printnumber(self):
        print('员工类总共实例化了{}个对象'.format(self.number))
p = Employee()
p2 = Employee()
p3 = Employee()
p3.printnumber()